package cn.thornbird.orgsync.entity;

import cn.thornbird.orgsync.entity.status.ExecuteStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Entity
@Table(name = "task_details")
@Where(clause = "deleted_at is null")
public class TaskDetail extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 3216455887908324805L;

    @Column(name = "task_id")
    private String taskId;

    @Column(name = "plan_time")
    private Date planTime;

    @Column(name = "sequence_index")
    private Short sequenceIndex;

    @Column(name = "execute_status")
    private ExecuteStatus executeStatus;

    @Column(name = "start_time")
    private Date startTime;

    @Column(name = "end_time")
    private Date endTime;

    @Column(name = "log")
    private String log;

}
